// Copyright 2013 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef COMPAT_H_
#define COMPAT_H_

#include <assert.h>
#include <string>
#include <vector>

using std::vector;
using std::string;

#define HAS_GFLAGS 0
#if HAS_GFLAGS
#include <gflags/gflags.h>  // https://gflags.googlecode.com/
#else
namespace google {
inline void ParseCommandLineFlags(int*, char***, bool) {}
}
#define DEFINE_bool(name, value, descrip) bool FLAGS_##name = value;
#define DEFINE_string(name, value, descrip) string FLAGS_##name = value;
#define DEFINE_int32(name, value, descrip) int FLAGS_##name = value;
#define DEFINE_double(name, value, descrip) double FLAGS_##name = value;
#endif

typedef unsigned char uint8;
static const uint8 kuint8max = 255;

typedef long long int64;

#define CHECK(expr) assert(expr)

// TODO
inline std::vector<string> SplitString(const string& str, const string& delim) {
  CHECK(false);
  return std::vector<string>(1, str);
}

#endif  // COMPAT_H_
